Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to be consistent with the other publishing apps we have moved the google tage snippet into a partial. This matches the way this was done in all the other publishing apps owned by the publishing experience team.
Google Tag Manager (GTM) can be included on all pages of the app by configuring the following environment variables:
GOOGLE_TAG_MANAGER_ID
GOOGLE_TAG_MANAGER_AUTH
GOOGLE_TAG_MANAGER_PREVIEW
All three variables are optional.
If none are set, GTM will not be included on the page.
If only GOOGLE_TAG_MANAGER_ID is set, the default environment of the GTM container will be used.
If GOOGLE_TAG_MANAGER_AUTH and GOOGLE_TAG_MANAGER_PREVIEW are set, the specified GTM container environment will be used. This is used for managing the rollout of changes to integration so they can be tested before rolling out to production.
Trello card: https://trello.com/c/Wcuq3R1S/2167-add-ga4-page-view-tracking-to-apps-that-we-own